local Lua__zhanlidibz = fk.CreateSkill{
  name = "Lua__zhanlidibz",
  tags = {Skill.Compulsory},
  anim_type = "control",
}

Fk:loadTranslationTable{
  ["Lua__zhanlidibz"] = "战力地板砖",
  [":Lua__zhanlidibz"] = "锁定技，当你造成大于2点的伤害时，改为本局游戏出现过的最大伤害数值-1。",
  ["@Lua__zhanlidibz"] = "最高伤害:",
}

Lua__zhanlidibz:addEffect(fk.Damage, {
    mute = true,
    can_trigger = function(self, event, target, player, data)
      return player:hasSkill(Lua__zhanlidibz.name) 
    end,
    on_use = function(self, event, target, player, data)
      local max_damage = player:getMark("@Lua__zhanlidibz")
      if data.damage > player:getMark("@Lua__zhanlidibz") then
        player.room:setPlayerMark(player, "@Lua__zhanlidibz", data.damage)
      end
      data:changeDamage(max_damage - 1)
    end,
  })

Lua__zhanlidibz:addEffect(fk.DamageCaused, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(Lua__zhanlidibz.name) and data.damage > 2 and player:getMark("@Lua__zhanlidibz") > 0
  end,
  on_use = function(self, event, target, player, data)

    data:changeDamage(player:getMark("@Lua__zhanlidibz") - 1)
  end,
})


return Lua__zhanlidibz 